
cmd /c del msg\src\* /Q
@ping 127.0.0.1 -n 2 >nul   

cmd /c node_modules\.bin\pbjs.cmd -t static-module  --keep-case protocol/client.proto protocol/client_battle.proto protocol/common.proto protocol/common_def.proto -o msg/src/protocol.js

@ping 127.0.0.1 -n 2 >nul 
cmd /c node_modules\.bin\pbts.cmd --no-comments -m msg/src/protocol.js -o msg/src/protocol.d.ts

@ping 127.0.0.1 -n 2 >nul 
gen_ts.exe -in=msg\src\protocol.d.ts -out=msg\src\msg.ts

@ping 127.0.0.1 -n 2 >nul 
cd msg
cmd /c egret build msg
cd ..

@ping 127.0.0.1 -n 2 >nul 
copy  msg\bin\protocol.d.ts ..\protobuf\bundles\protobuf-bundles.d.ts /Y
copy  msg\bin\protocol.js ..\protobuf\bundles\protobuf-bundles.js /Y
copy  msg\bin\protocol.min.js ..\protobuf\bundles\protobuf-bundles.min.js /Y

echo FINISH
@ping 127.0.0.1 -n 2 >nul 